import { View } from "../../../../mvc/core/View";
import { ToolTipsManager } from "../../../../../com/mui/manager/ToolTipsManager";
import { Language } from "../../../../../extend/language/Language";
import { GlobalClass } from "../../../../../com/mui/core/GlobalClass";
import { ImagesConst } from "../../../resource/ImagesConst";
import { Dispatcher } from "../../../../mvc/core/Dispatcher";
import { DataEvent } from "../../../events/DataEvent";
import { GuildEventName } from "../GuildEventName";
import { UiHintIconView } from "../../uiIconBtn/UiHintIconView";
//class WelcomeHintIcon
    
    export  class WelcomeHintIcon extends View
    {
        constructor()
        {
            super();
            this.buttonMode = true;
            ToolTipsManager.register(this, null, Language.getString(57229));
            this.createChildren();
            this.addListeners();
            return;
        }

        /* internal  */createChildren(): void
        {
            this.addChild(GlobalClass.getScaleBitmap(ImagesConst.FriendBless_hintIcon));
            return;
        }

        /* internal  */addListeners(): void
        {
            this.addEventListener(flash.events.MouseEvent.CLICK, this.hintIcon_click);
            return;
        }

        public showIcon(arg1: Array<any>): void
        {
            this.show();
            return;
        }

        /* internal  */hintIcon_click(arg1: Object /* flash.events.MouseEvent */): void
        {
            Dispatcher.dispatchEvent(new DataEvent(GuildEventName.OpenWelcomeListWindow));
            UiHintIconView.instance.removeHintIcon(this);
            return;
        }
    }
